package com.hgxd.entity.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 变量表
 * </p>
 *
 * @author fsd
 * @since 2023-10-18
 */
@Getter
@Setter
@TableName("rb_variate")
@ApiModel(value = "Variate对象", description = "变量表")
public class Variate implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("变量ID")
      @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty("变量名称")
    private String name;

    @ApiModelProperty("当前值")
    private Double nowValue;

    @ApiModelProperty("报警阈值")
    private String thresholdVlaue;

    @ApiModelProperty("所属从机id")
    private Integer slaveId;

    @ApiModelProperty("所属从机名称")
    private String slaveName;

    @ApiModelProperty("所属设备ID")
    private Integer equipmentId;

    @ApiModelProperty("所属设备名称")
    private String equipmentName;

    @ApiModelProperty("创建时间")
    @JsonFormat(shape=JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime creatTime;

    @ApiModelProperty("更新时间")
    @JsonFormat(shape=JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updateTime;

    @ApiModelProperty("变量单位")
    private String unit;

    @ApiModelProperty("变量标识符")
    private String tag;

    @ApiModelProperty("寄存器")
    private String register;

    @ApiModelProperty("数据格式")
    private String dataFormat;

    @ApiModelProperty("小数位数")
    private String decimalDigits;

    @ApiModelProperty("存储方式：1:变化储存；2:全部储存 3、变化幅度存储、定时存储 ")
    private Integer saveMode;

    @ApiModelProperty("读写方式：1::读写；2:只读")
    private Integer readWriteMode;

    @ApiModelProperty("采集频率：单位-->分钟")
    private Integer frequency;


}
